import request from '@/utils/request';

//获取轮播图列表
export async function getSlides(params){
  return request('/admin/slides',{params})
}
//是否禁用轮播图
export async function lockSlides(editId){
  return request.patch(`/admin/slides/${editId}/status`)
}
//添加轮播图
export async function addSlides(data){
  return request.post('/admin/slides',{data})
}
//更新轮播图
export async function updateSlides(editId,data){
  return request.put(`/admin/slides/${editId}`,{data})
}
//获取轮播图详情
export async function showSlides(editId){
  return request(`/admin/slides/${editId}`)
}
//删除轮播图
export async function deleteSlides(editId){
  return request.delete(`/admin/slides/${editId}`)
}
//轮播图排序
export async function sortSlides(editId,data){
  return request.patch(`/admin/slides/${editId}/seq`,{data})
}